package com.huangbc.servicemap.service;

import com.huangbc.internalcommon.dto.ResponseResult;
import com.huangbc.internalcommon.dto.ServiceRequest;
import com.huangbc.servicemap.remote.ServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: Derek.huang on 2024/3/29 19:25.
 */
@Service
public class ServiceFromMapService {

    @Autowired
    private ServiceClient serviceClient;


    /**
     * 创建服务
     * @param name
     * @return
     */
    public ResponseResult add(String name){

        return serviceClient.add(name);

    }

    /**
     * 查询服务
     * @param amapKey
     * @return
     */
    public ResponseResult list(String amapKey) {

        return serviceClient.list(amapKey);
    }

    /**
     * 删除服务
     * @param serviceRequest
     * @return
     */
    public ResponseResult delete(ServiceRequest serviceRequest) {
       return serviceClient.delete(serviceRequest);
    }
}
